package controller.notice ;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import Bean.noticeBean;
import dao.noticeDao;


public class FindController implements Controller{
	
	private noticeDao ntdao;

	public void setNtdao(noticeDao ntdao) {
		this.ntdao = ntdao;
	}

	@Override
	public ModelAndView handleRequest(HttpServletRequest request,
			HttpServletResponse arg1) throws Exception {
		int nno = Integer.parseInt(request.getParameter("nno"));
		System.out.println("FindController:nno = " + nno);
		noticeBean bean = ntdao.getInfo(nno);

		return new ModelAndView("noticeDetail", "notice", bean);
	}	
}